#include <stdio.h>
#include "linklistfun.h"

int main(int argc, const char *argv[])
{
	link_node *H = creat_headnode();
	int getchoose=0;
	while(1)
	{
		printf("1.headinsert  2.tailinsert  3.posinsert \n");
		printf("4.headdelete  5.taildelete  6.posdelete \n");
		printf("7.view        8.exit        9.backposdel\n");
		printf("plz input choose >>");
		scanf("%d",&getchoose);
		switch(getchoose)
		{
			case 1:
				headinsert(H);
				break;
			case 2:
				tailinsert(H);
				break;
			case 3:
				numberinsert(H);
				break;
			case 4:
				headdelete(H);
				break;
			case 5:
				taildelete(H);
				break;
			case 6:
				numdelete(H);
				break;
			case 7:
				view(H);
				break;
			case 8:
				printf("GOODBYE\n");
				return 0;
				break;
			case 9:
				backposdelete(H);
				break;
			default:
				printf("input error\n");
				break;
		}
	}


	return 0;
}
